package com.hmsg.health.service;



import lombok.extern.slf4j.Slf4j;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.convert.RemoveIndexedData;
import org.springframework.stereotype.Service;

import org.springframework.transaction.annotation.Transactional;

import com.hmsg.health.bean.domain.TaskDo;
import com.hmsg.health.bean.domain.UserDo;
import com.hmsg.health.dao.TaskDao;
import com.hmsg.health.dao.UserDao;

@Slf4j
@Service
public class TaskService {
   
    @Autowired
    private UserDao userDao;
  
    @Autowired
    private TaskDao taskDao;
  
    public TaskDo findOne(Integer id){
    	TaskDo demoDo = taskDao.findOne(id);
    	
        return demoDo == null ? null : demoDo;
    }
    
    public List<TaskDo> select(TaskDo info){
    	List<TaskDo> demoDo = taskDao.select(info);
    	
        return demoDo == null ? null : demoDo;
    }
    public List<TaskDo> selectNot(Integer id){
    	List<TaskDo> demoDo = taskDao.selectNot(id);
    	
        return demoDo == null ? null : demoDo;
    }

    public Integer save(TaskDo user){
    	Integer res = taskDao.save(user);
        return res;
    }

    @Transactional
    public void update(TaskDo user){
    	taskDao.update(user);
    }
    
    public int delete(Integer userId){
    	return taskDao.delete(userId);
    }
    
   
}